'''
Created on Sep 20, 2011

@author: tel
'''
from data.rule import RuleBase, TokenizeMixin
from datasql import MakeDataSQL

RunData = MakeDataSQL('RunData', dtype='run', parent_dtype= 'prot')

class RunRule(RuleBase, TokenizeMixin):
    def __init__(self, fi):
        self.rundict = {'files': [fi],
                        'rtype': 'Run',
                        'Dclass': RunData,
                        'strip': True,
                        'ptok' : '^\(.*\)$',
                        'mtok': -1,
                        'dtok': 0}
        super(RunRule, self).__init__(**self.rundict)
